/**
 * @description wx service
 */

const User = require('../db/model/User')

/**
 * @description 查询用户是否存在
 * @param {string} openId wx的openId
 */
async function queryUser(openId) {
    console.log(openId,'openId');
    const result = await User.findOne({
        where:{
            openId
        }
    })
    console.log(result == null)
    console.log(JSON.stringify(result))
    return result
}

async function setUserInfo() {

}

module.exports = {
    queryUser
}